package com.ldk.api;

/**
 * 请求接口平台
 * @author xiangwl
 *
 */
public enum RequestPlatform {
	client("client"),
	driver("driver")
	;
	private RequestPlatform(String name){
		this.name = name;
	}
	private String name;
	
	public String getName() {
		return name;
	}
	
	/**
	 * 根据平台名称获取平台枚举
	 * @param name
	 * @return
	 */
	public static RequestPlatform getPlatform(String name){
		if(RequestPlatform.client.getName().equalsIgnoreCase(name)){
			return RequestPlatform.client;
		}
		return RequestPlatform.driver;
		
	}
}
